package com.example.wanjialei.controller;

import com.example.wanjialei.pojo.User;
import com.example.wanjialei.service.UserService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@CrossOrigin
@RestController
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("/getAllUserInfo")
    public Map<String,Object> getUserInfo(@RequestBody User user){
        return userService.getUserInfo(user);
    }
    @RequestMapping("/getUserInfoByName")
    public Map<String,Object> getUserInfoByName(@RequestBody User user){
        return userService.getUserInfoByName(user);
    }

    @RequestMapping("/userSign")
    public Map<String, Object> getUserSign(@RequestBody User user){
        return userService.getUserSign(user);
    }
}
